package user;

import operation.*;

import java.util.Scanner;

public class Sellsman extends Man {
        private String account;
        private String password;

        private String sex;
        private int age;

        public String getAccount() {
            return account;
        }

        public void setAccount(String account) {
            this.account = account;
        }

        public String getPassword() {
            return password;
        }

        public void setPassword(String password) {
            this.password = password;
        }

        public String getSex() {
            return sex;
        }

        public void setSex(String sex) {
            this.sex = sex;
        }

        public int getAge() {
            return age;
        }

        public void setAge(int age) {
            this.age = age;
        }
    private static int count = 1;
    public Sellsman(String name) {
        super(name);
        this.ioPerations = new IOPeration[]{
                new ExitSystem(),
                new FindMedicine(),
                new FindEquipment(),
                new AddMedicine(),
                new AddEquipment(),
                new DelMedicine(),
                new DelEquipment(),
                new ShowAllMedicine(),
                new ShowAllEquipment(),
                new AddAmountOfMed(),
                new AddAmountOfEqu(),
                new ChangePriceOfMed(),
                new ChangePriceOfEqu(),
                new ChangeSellPassword()
        };
    }

    @Override
    public int menu() {
        if(count == 1){
            System.out.println("欢迎 "+this.name+" 进入药店！");
            count++;
        }
        System.out.println("*********店员操作面板***********");
        System.out.println("1.查找药品");
        System.out.println("2.查找器械");
        System.out.println("3.新增药品");
        System.out.println("4.新增器材");
        System.out.println("5.删除药品");
        System.out.println("6.删除器材");
        System.out.println("7.显示药品");
        System.out.println("8.显示器械");
        System.out.println("9.添加药品");
        System.out.println("10.添加器械");
        System.out.println("11.更改药品价格");
        System.out.println("12.更改器械价格");
        System.out.println("13.修改密码");
        System.out.println("0.退出系统");
        System.out.println("**************************");
        System.out.println("请输入你的操作");
        Scanner sc = new Scanner(System.in);
        int choice = -1;
        try{
            choice = sc.nextInt();
        }catch (Exception e){
            //System.out.println("操作存在错误！！！");
        }
        return choice;
    }
}
